package lk.icta.core.dao;

import lk.icta.user.entity.User;

import java.util.List;

/**
 * @author Supun Nimesh Karunathilaka
 */
public interface LandAssociationDao {

    /**
     * Add Land Alienation Method Metadata
     *
     * @param landAssociation Alienation Metadata to be persisted
     * @param user                         user who performs this action
     */
    public void addLandAlienationMetadata(lk.icta.core.entity.LandAssociation landAssociation, User user);

    /**
     * Update Land Alienation Method Metadata
     *
     * @param landAssociation Alienation Metadata to be updated
     * @param user                         user who performs this action
     */
    public void updateLandAlienationMetadata(lk.icta.core.entity.LandAssociation landAssociation, User user);

    /**
     * return all alienation method meta data corresponding to given land id
     *
     * @param id   land id
     * @param user user performong the operation
     * @return LandAssociation list
     */
    public List<lk.icta.core.entity.LandAssociation> getAllAlienationMethodMetadataByLand(long id, User user);

    /**
     * return all Define alienation method meta data corresponding to given land id
     *

     * @param user user performong the operation
     * @return LandAssociation list
     */
    public List<lk.icta.core.entity.LandAssociation> getAllNotApprovedDefineAlienationMethodMetadata(User user);

    public List<lk.icta.core.entity.LandAssociation> getAllNotApprovedDefineAlienationMetadataByUser(User user);

    public List<lk.icta.core.entity.LandAssociation> getAllNotApprovedDefineAlienationMetadataByGn(int id,User user);

    /**
     * return all Define alienation method meta data corresponding to given land id
     *

     * @param user user performong the operation
     * @return LandAssociation list
     */
    public List<lk.icta.core.entity.LandAssociation> getAllNotApprovedAssociationAlienationMethodMetadata(User user);

     public List<lk.icta.core.entity.LandAssociation> getAllNotApprovedAssociationAlienationMethodMetadataByUser(User user);

     public List<lk.icta.core.entity.LandAssociation> getAllNotApprovedAssociationAlienationMethodMetadataByGn(int id,User user);

    /**
     * return a alienation method meta data corresponding to given metadata id
     *
     * @param id   metadata id
     * @param user user performong the operation
     * @return LandAssociation
     */
    public lk.icta.core.entity.LandAssociation getAlienationMethodMetadataById(long id, User user);

    /**
     * return all not approved alienation method meta data corresponding to given land id
     *
     * @param id   land id
     * @param user user performong the operation
     * @return LandAssociation list
     */
    public List<lk.icta.core.entity.LandAssociation> getAllNotApprovedAlienationMethodMetadataByLand(long id, User user);

    /**
     * return all not approved Definealienation method meta data corresponding to given land id
     *
     * @param id   land id
     * @param user user performong the operation
     * @return LandAssociation list
     */
    public List<lk.icta.core.entity.LandAssociation> getAllNotApprovedDefineAlienationMethodMetadataByLand(long id, User user);

    /**
     * return all alienation method meta data corresponding to given land id
     *
     * @param id   land id
     * @param user user performong the operation
     * @return LandAssociation list
     */
    public List<lk.icta.core.entity.LandAssociation> getAlienationMethodMetadataListByLand(long id, User user);


    /**
     * return all alienation method meta data corresponding to given land id
     *
     * @param id   land id
     * @param user user performong the operation
     * @return LandAssociation
     */
    public lk.icta.core.entity.LandAssociation getAlienationMethodMetadataByLand(long id, User user);

    /**
     * returns all alienation method metadata by alienation methos
     *
     * @param id   Alienation Method id
     * @param user user performing the operation
     * @return LandAssociation list
     */
    public List<lk.icta.core.entity.LandAssociation> getAllAlienationMethodMetadataByAlienationMethod(int id, User user);

    public List<lk.icta.core.entity.LandAssociation> getAllApprovedDefineAlienationMethodMetadataByUser(User user);

    public List<lk.icta.core.entity.LandAssociation> getAllApprovedDefineAlienationMethodMetadataByUserAndMethodId(int id,User user);

    public List<lk.icta.core.entity.LandAssociation> getAllApprovedDefineAlienationMethodMetadataByDs(int dsId,User user);

    public List<lk.icta.core.entity.LandAssociation> getAllApprovedDefineAlienationMethodMetadataByDistrict(int districtId,User user);

     /**
     *Remove a LandAssociation given its id
     *
     * @param id : LandAsociation id
     * @return LandAssociation list
     */
    public void removeLandAssociation(long id, User user);
}
